package com.mapforge.selection;

import java.util.Iterator;

/**
 * The {@link NullIterator} class represents a generic iterator which
 * essentially does nothing. Its useful for when a data structure is empty and
 * needs to return an empty iterator.
 * 
 * @author Will Morrison
 * 
 * @param <T>
 *            any generic type
 */
public class NullIterator<T> implements Iterator<T> {

	@Override
	public boolean hasNext() {
		return false;
	}

	@Override
	public T next() {
		return null;
	}

	@Override
	public void remove() {
		// intentionally left blank
	}
}
